// localStorage 与 Cookie对比
// 获取: Cookie.get(key)     localStorage.getItem(key)
// 设置: Cookie.set(key,value)   localStorage.setItem(key,value)
// 删除: Cookie.remove(key)    localStorage.removeItem(key)

import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
